//
//  PartialViewBase.m
//  ios-supplier
//
//  Created by feynmanyuan on 15/4/19.
//  Copyright (c) 2015年 feynmanyuan. All rights reserved.
//

#import "PartialViewBase.h"

@implementation PartialViewBase

- (id)initWithCoder:(NSCoder *)decoder {
    self = [super initWithCoder:decoder];
    if( !self.drawLineHelper ) {
        self.drawLineHelper = [[JFBDrawLineHelper alloc]init];
        return self;
    }
    return self;
}

- (instancetype)init {
    self = [super init];
    if( self ) {
        self.drawLineHelper = [[JFBDrawLineHelper alloc]init];
        return self;
    }
    return self;
}

- (void)drawRect:(CGRect)rect {
    [self.drawLineHelper addHorizontalLine:0 y:0 color:LineColorDefault width:self.bounds.size.width];
    [self.drawLineHelper addHorizontalLine:0 y:self.height color:LineColorDefault width:self.bounds.size.width];
    // 1.获取上下文环境
    CGContextRef context = UIGraphicsGetCurrentContext();
    
    [self.drawLineHelper drawRect:context];
}

@end
